import time
import unittest

from selenium import webdriver
from selenium.webdriver.chrome.service import Service


class MyTestCase(unittest.TestCase):
    driver = None

    @classmethod
    def setUpClass(cls) -> None:
        service = Service(executable_path="../../driver/chromedriver.exe")
        cls.driver = webdriver.Chrome(service=service)

    def test_chrome(self):
        self.driver.get("https://www.jd.com")

        # wait(5)
        time.sleep(5)

    @classmethod
    def tearDownClass(cls) -> None:
        # cls.driver.close()
        cls.driver.quit()


if __name__ == '__main__':
    unittest.main()
